Dreamweaver Article

Implementing User Authentication


Table of Contents

  1. Introduction
  2. Setting Up The Site
  3. User Authentication as a Web Application
  4. Introducing Sessions and Session Variables
  5. Implementing Registration
  6. Implementing Log-on
  7. Enabling Sessions With Application.cfm (ColdFusion Only)
  8. Restricting Access to Pages
  9. Implementing Log Out

Setting Up The Site

Before you can complete the tutorial, download and configure the site files on the first page of this article. Install the files on a web server (Dreamweaver calls this the Testing Server). This server can be a locally running copy of IIS (for ASP, ColdFusion, or PHP), the ColdFusion standalone web server, or Apache (for PHP). PHP users will also need access to a MySQL server. The following basic directions summarize the setup procedures.

  1. Unzip the files and copy them onto the server.
    • ASP and ColdFusion users: Put users.mdb Access database in a folder with appropriate permissions on it, so that the web user has Full Control over it (Windows XP users can put it in the Shared Documents folder). Create a DSN that specifies the Access database. Although the name of the DSN doesn't strictly matter, the steps and screen shots assume the DSN is named user_auth. To learn how to set up a DSN, see Setting up a DSN in Windows (TechNote 15912).
    • PHP users: Process users.sql to create and populate a database inside your MySQL database server.

  2. Define a new site in Dreamweaver that points to these files. Be sure to specify a server model and a Testing Server, including the URL Prefix. For help on learning how to define a site in Dreamweaver, see How to define a site in Dreamweaver (TechNote 14028).
  3. Create a database connection in Dreamweaver, using the Databases panel. Though the connection name doesn't matter, the steps and screen shots for this tutorial use user_auth as the name. See the documentation within Dreamweaver for information on how to set up a database connection by selecting Window > Using Dreamweaver > Index tab > connecting to databases.